import tableConfig from '@/avuejs/table-config'
import { uploadUrl } from "@/api/base.js";

import store from "@/store";

export default (self) => {
    return {
        ...tableConfig(),
        index: false,
        column: [
            {
                label: 'ID',
                prop: 'id',
                display: false,
            },
            {
                label: '活码标题',
                search: true,
                prop: 'title'
            },
            {
                label: '状态',
                prop: 'status',
                search: true,
                type: 'select',
                dicData: store.getters?.dic?.GroupLiveCode?.STATUS || []
            },
            {
                label: '群二维码',
                prop: 'group_qr_code',
                type: 'upload',
                action: uploadUrl(),
                listType: 'picture-img',
            },
            {
                label: '微信二维码', prop: 'wx_qr_code',
                type: 'upload',
                action: uploadUrl(),
                listType: 'picture-img',
            },
            {
                label: '失效日期',
                prop: 'expiry_date',
                type: "date",
                "value-format": "yyyy-MM-dd"
            },
            {
                label: '扫描次数',
                prop: 'scan_count',
                display: false,
            },
            {
                label: '群活码',
                prop: 'group_live_qr_code',
                type: 'upload',
                action: uploadUrl(),
                display: false,
                listType: 'picture-img',
            },
            {
                label: '创建时间',
                prop: 'created_at',
                display: false
            }
        ]
    }
}